package com.sixth.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sixth.core.entity.OrderBackfeeItem;
import com.sixth.core.entity.OrderChargeItem;
import com.sixth.core.vo.R;
import com.sixth.mapper.OrderBackfeeItemMapper;
import com.sixth.service.OrderBackfeeItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @program: sixth-hospital-parent
 * @description:
 * @author: 李劲锋
 * @create: 2024-08-19 15:35
 **/
@Service
public class OrderBackfeeItemServiceImpl extends ServiceImpl<OrderBackfeeItemMapper, OrderBackfeeItem> implements
        OrderBackfeeItemService {

    @Autowired
    protected OrderBackfeeItemMapper orderBackfeeItemMapper;
    @Override
    public R<List<OrderBackfeeItem>> orderFeeItemList(String backId) {
        // 创建查询条件，用于查询订单项列表
        QueryWrapper<OrderBackfeeItem> wrapper = new QueryWrapper<>();
        wrapper.eq("back_id", backId);

        // 查询并返回订单项列表
        List<OrderBackfeeItem> orderBackfeeItemList = orderBackfeeItemMapper.selectList(wrapper);
        return R.ok(orderBackfeeItemList);
    }
}
